package org.bjou

//部门
class Department {
    
    String departmentName
    
      
    
    static hasMany = [ users: ShiroUser]

    static constraints = {
        departmentName(nullable: true, blank: true)
       
    }
    
    static namedQueries = {
        findByUser {
            userId ->
            users {
                eq 'id', userId
            }
        }
    }
}
